package com.hlb.test.controller;

import com.github.pagehelper.PageHelper;
import com.hlb.test.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * Created by Administrator on 2016/12/16.
 */
@Controller
public class StudentController {
    @Autowired
    StudentService studentService;
    @RequestMapping("list")
    public String list(Map map) throws Exception {
        PageHelper.startPage(4,10);
        map.put("obj",studentService.findAll());
        System.out.println(studentService.findAll());
        return "students";
    }
}
